import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/index/models/indicator_document_entity.dart';

IndicatorDocumentEntity $IndicatorDocumentEntityFromJson(
    Map<String, dynamic> json) {
  final IndicatorDocumentEntity idEntity = IndicatorDocumentEntity();
  final String? BUDGET_LEVEL_NAME =
      jsonConvert.convert<String>(json['BUDGET_LEVEL_NAME']);
  if (BUDGET_LEVEL_NAME != null) {
    idEntity.BUDGET_LEVEL_NAME = BUDGET_LEVEL_NAME;
  }
  final String? BGT_EXE_FLAG =
      jsonConvert.convert<String>(json['BGT_EXE_FLAG']);
  if (BGT_EXE_FLAG != null) {
    idEntity.BGT_EXE_FLAG = BGT_EXE_FLAG;
  }
  final String? SOURCE_TYPE_NAME =
      jsonConvert.convert<String>(json['SOURCE_TYPE_NAME']);
  if (SOURCE_TYPE_NAME != null) {
    idEntity.SOURCE_TYPE_NAME = SOURCE_TYPE_NAME;
  }
  final int? IS_DELETED = jsonConvert.convert<int>(json['IS_DELETED']);
  if (IS_DELETED != null) {
    idEntity.IS_DELETED = IS_DELETED;
  }
  final String? SUP_BGT_DOC_NO =
      jsonConvert.convert<String>(json['SUP_BGT_DOC_NO']);
  if (SUP_BGT_DOC_NO != null) {
    idEntity.SUP_BGT_DOC_NO = SUP_BGT_DOC_NO;
  }
  final String? BGT_ID = jsonConvert.convert<String>(json['BGT_ID']);
  if (BGT_ID != null) {
    idEntity.BGT_ID = BGT_ID;
  }
  final String? BGT_TYPE_NAME =
      jsonConvert.convert<String>(json['BGT_TYPE_NAME']);
  if (BGT_TYPE_NAME != null) {
    idEntity.BGT_TYPE_NAME = BGT_TYPE_NAME;
  }
  final int? IS_GOV_PUR = jsonConvert.convert<int>(json['IS_GOV_PUR']);
  if (IS_GOV_PUR != null) {
    idEntity.IS_GOV_PUR = IS_GOV_PUR;
  }
  final String? EXP_FUNC_NAME =
      jsonConvert.convert<String>(json['EXP_FUNC_NAME']);
  if (EXP_FUNC_NAME != null) {
    idEntity.EXP_FUNC_NAME = EXP_FUNC_NAME;
  }
  final String? MOF_DEP_CODE =
      jsonConvert.convert<String>(json['MOF_DEP_CODE']);
  if (MOF_DEP_CODE != null) {
    idEntity.MOF_DEP_CODE = MOF_DEP_CODE;
  }
  final String? TRACK_PRO_CODE =
      jsonConvert.convert<String>(json['TRACK_PRO_CODE']);
  if (TRACK_PRO_CODE != null) {
    idEntity.TRACK_PRO_CODE = TRACK_PRO_CODE;
  }
  final String? REC_DIV_CODE =
      jsonConvert.convert<String>(json['REC_DIV_CODE']);
  if (REC_DIV_CODE != null) {
    idEntity.REC_DIV_CODE = REC_DIV_CODE;
  }
  final String? DEP_BGT_ECO_NAME =
      jsonConvert.convert<String>(json['DEP_BGT_ECO_NAME']);
  if (DEP_BGT_ECO_NAME != null) {
    idEntity.DEP_BGT_ECO_NAME = DEP_BGT_ECO_NAME;
  }
  final String? AMOUNT = jsonConvert.convert<String>(json['AMOUNT']);
  if (AMOUNT != null) {
    idEntity.AMOUNT = AMOUNT;
  }
  final String? FUND_TYPE_CODE =
      jsonConvert.convert<String>(json['FUND_TYPE_CODE']);
  if (FUND_TYPE_CODE != null) {
    idEntity.FUND_TYPE_CODE = FUND_TYPE_CODE;
  }
  final String? TP_FUNC_CODE =
      jsonConvert.convert<String>(json['TP_FUNC_CODE']);
  if (TP_FUNC_CODE != null) {
    idEntity.TP_FUNC_CODE = TP_FUNC_CODE;
  }
  final String? ADJ_BATCH_NO =
      jsonConvert.convert<String>(json['ADJ_BATCH_NO']);
  if (ADJ_BATCH_NO != null) {
    idEntity.ADJ_BATCH_NO = ADJ_BATCH_NO;
  }
  final String? BUDGET_LEVEL_CODE =
      jsonConvert.convert<String>(json['BUDGET_LEVEL_CODE']);
  if (BUDGET_LEVEL_CODE != null) {
    idEntity.BUDGET_LEVEL_CODE = BUDGET_LEVEL_CODE;
  }
  final String? PRO_CODE = jsonConvert.convert<String>(json['PRO_CODE']);
  if (PRO_CODE != null) {
    idEntity.PRO_CODE = PRO_CODE;
  }
  final String? BGT_MOF_DEP_CODE =
      jsonConvert.convert<String>(json['BGT_MOF_DEP_CODE']);
  if (BGT_MOF_DEP_CODE != null) {
    idEntity.BGT_MOF_DEP_CODE = BGT_MOF_DEP_CODE;
  }
  final String? CREATE_TIME = jsonConvert.convert<String>(json['CREATE_TIME']);
  if (CREATE_TIME != null) {
    idEntity.CREATE_TIME = CREATE_TIME;
  }
  final String? BGT_DEC = jsonConvert.convert<String>(json['BGT_DEC']);
  if (BGT_DEC != null) {
    idEntity.BGT_DEC = BGT_DEC;
  }
  final String? AGENCY_CODE = jsonConvert.convert<String>(json['AGENCY_CODE']);
  if (AGENCY_CODE != null) {
    idEntity.AGENCY_CODE = AGENCY_CODE;
  }
  final String? MANAGE_MOF_DEP_CODE =
      jsonConvert.convert<String>(json['MANAGE_MOF_DEP_CODE']);
  if (MANAGE_MOF_DEP_CODE != null) {
    idEntity.MANAGE_MOF_DEP_CODE = MANAGE_MOF_DEP_CODE;
  }
  final String? DIS_AMT = jsonConvert.convert<String>(json['DIS_AMT']);
  if (DIS_AMT != null) {
    idEntity.DIS_AMT = DIS_AMT;
  }
  final String? FUND_TYPE_NAME =
      jsonConvert.convert<String>(json['FUND_TYPE_NAME']);
  if (FUND_TYPE_NAME != null) {
    idEntity.FUND_TYPE_NAME = FUND_TYPE_NAME;
  }
  final String? MANAGE_MOF_DEP_NAME =
      jsonConvert.convert<String>(json['MANAGE_MOF_DEP_NAME']);
  if (MANAGE_MOF_DEP_NAME != null) {
    idEntity.MANAGE_MOF_DEP_NAME = MANAGE_MOF_DEP_NAME;
  }
  final String? BGT_TYPE_CODE =
      jsonConvert.convert<String>(json['BGT_TYPE_CODE']);
  if (BGT_TYPE_CODE != null) {
    idEntity.BGT_TYPE_CODE = BGT_TYPE_CODE;
  }
  final String? BGT_DOC_TITLE =
      jsonConvert.convert<String>(json['BGT_DOC_TITLE']);
  if (BGT_DOC_TITLE != null) {
    idEntity.BGT_DOC_TITLE = BGT_DOC_TITLE;
  }
  final String? GOV_BGT_ECO_CODE =
      jsonConvert.convert<String>(json['GOV_BGT_ECO_CODE']);
  if (GOV_BGT_ECO_CODE != null) {
    idEntity.GOV_BGT_ECO_CODE = GOV_BGT_ECO_CODE;
  }
  final String? SOURCE_TYPE_CODE =
      jsonConvert.convert<String>(json['SOURCE_TYPE_CODE']);
  if (SOURCE_TYPE_CODE != null) {
    idEntity.SOURCE_TYPE_CODE = SOURCE_TYPE_CODE;
  }
  final String? BGT_PMAN_ID = jsonConvert.convert<String>(json['BGT_PMAN_ID']);
  if (BGT_PMAN_ID != null) {
    idEntity.BGT_PMAN_ID = BGT_PMAN_ID;
  }
  final int? IS_TRACK = jsonConvert.convert<int>(json['IS_TRACK']);
  if (IS_TRACK != null) {
    idEntity.IS_TRACK = IS_TRACK;
  }
  final String? UPDATE_TIME = jsonConvert.convert<String>(json['UPDATE_TIME']);
  if (UPDATE_TIME != null) {
    idEntity.UPDATE_TIME = UPDATE_TIME;
  }
  final String? COR_BGT_DOC_NO =
      jsonConvert.convert<String>(json['COR_BGT_DOC_NO']);
  if (COR_BGT_DOC_NO != null) {
    idEntity.COR_BGT_DOC_NO = COR_BGT_DOC_NO;
  }
  final String? EXP_FUNC_CODE =
      jsonConvert.convert<String>(json['EXP_FUNC_CODE']);
  if (EXP_FUNC_CODE != null) {
    idEntity.EXP_FUNC_CODE = EXP_FUNC_CODE;
  }
  final String? ORI_BGT_ID = jsonConvert.convert<String>(json['ORI_BGT_ID']);
  if (ORI_BGT_ID != null) {
    idEntity.ORI_BGT_ID = ORI_BGT_ID;
  }
  final String? TP_FUNC_NAME =
      jsonConvert.convert<String>(json['TP_FUNC_NAME']);
  if (TP_FUNC_NAME != null) {
    idEntity.TP_FUNC_NAME = TP_FUNC_NAME;
  }
  final String? CUR_AMT = jsonConvert.convert<String>(json['CUR_AMT']);
  if (CUR_AMT != null) {
    idEntity.CUR_AMT = CUR_AMT;
  }
  final String? PRO_NAME = jsonConvert.convert<String>(json['PRO_NAME']);
  if (PRO_NAME != null) {
    idEntity.PRO_NAME = PRO_NAME;
  }
  final String? FLOAT_AMT = jsonConvert.convert<String>(json['FLOAT_AMT']);
  if (FLOAT_AMT != null) {
    idEntity.FLOAT_AMT = FLOAT_AMT;
  }
  final String? AGENCY_NAME = jsonConvert.convert<String>(json['AGENCY_NAME']);
  if (AGENCY_NAME != null) {
    idEntity.AGENCY_NAME = AGENCY_NAME;
  }
  final String? MOF_DIV_CODE =
      jsonConvert.convert<String>(json['MOF_DIV_CODE']);
  if (MOF_DIV_CODE != null) {
    idEntity.MOF_DIV_CODE = MOF_DIV_CODE;
  }
  final String? FISCAL_YEAR = jsonConvert.convert<String>(json['FISCAL_YEAR']);
  if (FISCAL_YEAR != null) {
    idEntity.FISCAL_YEAR = FISCAL_YEAR;
  }
  final String? DOC_DATE = jsonConvert.convert<String>(json['DOC_DATE']);
  if (DOC_DATE != null) {
    idEntity.DOC_DATE = DOC_DATE;
  }
  final String? GOV_BGT_ECO_NAME =
      jsonConvert.convert<String>(json['GOV_BGT_ECO_NAME']);
  if (GOV_BGT_ECO_NAME != null) {
    idEntity.GOV_BGT_ECO_NAME = GOV_BGT_ECO_NAME;
  }
  final String? DEP_BGT_ECO_CODE =
      jsonConvert.convert<String>(json['DEP_BGT_ECO_CODE']);
  if (DEP_BGT_ECO_CODE != null) {
    idEntity.DEP_BGT_ECO_CODE = DEP_BGT_ECO_CODE;
  }
  final String? BGT_MOF_DEP_NAME =
      jsonConvert.convert<String>(json['BGT_MOF_DEP_NAME']);
  if (BGT_MOF_DEP_NAME != null) {
    idEntity.BGT_MOF_DEP_NAME = BGT_MOF_DEP_NAME;
  }
  final String? is_dis = jsonConvert.convert<String>(json['is_dis']);
  if (is_dis != null) {
    idEntity.is_dis = is_dis;
  }
  final String? is_special = jsonConvert.convert<String>(json['is_special']);
  if (is_special != null) {
    idEntity.is_special = is_special;
  }
  return idEntity;
}

Map<String, dynamic> $IndicatorDocumentEntityToJson(
    IndicatorDocumentEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['BUDGET_LEVEL_NAME'] = entity.BUDGET_LEVEL_NAME;
  data['BGT_EXE_FLAG'] = entity.BGT_EXE_FLAG;
  data['SOURCE_TYPE_NAME'] = entity.SOURCE_TYPE_NAME;
  data['IS_DELETED'] = entity.IS_DELETED;
  data['SUP_BGT_DOC_NO'] = entity.SUP_BGT_DOC_NO;
  data['BGT_ID'] = entity.BGT_ID;
  data['BGT_TYPE_NAME'] = entity.BGT_TYPE_NAME;
  data['IS_GOV_PUR'] = entity.IS_GOV_PUR;
  data['EXP_FUNC_NAME'] = entity.EXP_FUNC_NAME;
  data['MOF_DEP_CODE'] = entity.MOF_DEP_CODE;
  data['TRACK_PRO_CODE'] = entity.TRACK_PRO_CODE;
  data['REC_DIV_CODE'] = entity.REC_DIV_CODE;
  data['DEP_BGT_ECO_NAME'] = entity.DEP_BGT_ECO_NAME;
  data['AMOUNT'] = entity.AMOUNT;
  data['FUND_TYPE_CODE'] = entity.FUND_TYPE_CODE;
  data['TP_FUNC_CODE'] = entity.TP_FUNC_CODE;
  data['ADJ_BATCH_NO'] = entity.ADJ_BATCH_NO;
  data['BUDGET_LEVEL_CODE'] = entity.BUDGET_LEVEL_CODE;
  data['PRO_CODE'] = entity.PRO_CODE;
  data['BGT_MOF_DEP_CODE'] = entity.BGT_MOF_DEP_CODE;
  data['CREATE_TIME'] = entity.CREATE_TIME;
  data['BGT_DEC'] = entity.BGT_DEC;
  data['AGENCY_CODE'] = entity.AGENCY_CODE;
  data['MANAGE_MOF_DEP_CODE'] = entity.MANAGE_MOF_DEP_CODE;
  data['DIS_AMT'] = entity.DIS_AMT;
  data['FUND_TYPE_NAME'] = entity.FUND_TYPE_NAME;
  data['MANAGE_MOF_DEP_NAME'] = entity.MANAGE_MOF_DEP_NAME;
  data['BGT_TYPE_CODE'] = entity.BGT_TYPE_CODE;
  data['BGT_DOC_TITLE'] = entity.BGT_DOC_TITLE;
  data['GOV_BGT_ECO_CODE'] = entity.GOV_BGT_ECO_CODE;
  data['SOURCE_TYPE_CODE'] = entity.SOURCE_TYPE_CODE;
  data['BGT_PMAN_ID'] = entity.BGT_PMAN_ID;
  data['IS_TRACK'] = entity.IS_TRACK;
  data['UPDATE_TIME'] = entity.UPDATE_TIME;
  data['COR_BGT_DOC_NO'] = entity.COR_BGT_DOC_NO;
  data['EXP_FUNC_CODE'] = entity.EXP_FUNC_CODE;
  data['ORI_BGT_ID'] = entity.ORI_BGT_ID;
  data['TP_FUNC_NAME'] = entity.TP_FUNC_NAME;
  data['CUR_AMT'] = entity.CUR_AMT;
  data['PRO_NAME'] = entity.PRO_NAME;
  data['FLOAT_AMT'] = entity.FLOAT_AMT;
  data['AGENCY_NAME'] = entity.AGENCY_NAME;
  data['MOF_DIV_CODE'] = entity.MOF_DIV_CODE;
  data['FISCAL_YEAR'] = entity.FISCAL_YEAR;
  data['DOC_DATE'] = entity.DOC_DATE;
  data['GOV_BGT_ECO_NAME'] = entity.GOV_BGT_ECO_NAME;
  data['DEP_BGT_ECO_CODE'] = entity.DEP_BGT_ECO_CODE;
  data['BGT_MOF_DEP_NAME'] = entity.BGT_MOF_DEP_NAME;
  data['is_dis'] = entity.is_dis;
  data['is_special'] = entity.is_special;
  return data;
}

IndicatorDocumentPageEntity $IndicatorDocumentPageEntityFromJson(
    Map<String, dynamic> json) {
  final IndicatorDocumentPageEntity pageEntity = IndicatorDocumentPageEntity();
  final int? total = jsonConvert.convert<int>(json['total']);
  if (total != null) {
    pageEntity.total = total;
  }
  final int? size = jsonConvert.convert<int>(json['size']);
  if (size != null) {
    pageEntity.size = size;
  }
  final int? current = jsonConvert.convert<int>(json['current']);
  if (current != null) {
    pageEntity.current = current;
  }
  final int? pages = jsonConvert.convert<int>(json['pages']);
  if (pages != null) {
    pageEntity.pages = pages;
  }
  final List<IndicatorDocumentEntity>? records =
      jsonConvert.convert<List<IndicatorDocumentEntity>>(json['records']);
  if (records != null) {
    pageEntity.records = records;
  }
  return pageEntity;
}

Map<String, dynamic> $IndicatorDocumentPageEntityToJson(
    IndicatorDocumentPageEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['total'] = entity.total;
  data['size'] = entity.size;
  data['current'] = entity.current;
  data['records'] = entity.records;
  data['pages'] = entity.pages;
  return data;
}
